import React from 'react';
//引入样式文件
import '@/assets/css/login.css';
import { Card } from 'antd';
import { Tabs } from 'antd';
// 导入密码登录组件
import Normallogin from '@/components/Normallogin';

// 导入手机号登录组件
import Phonelogin from '@/components/Phonelogin';

const Login = () => {

    // 切换tab事件
    const onChange = (key) => {
        console.log(key);
    };
    const items = [
        {
            key: '1',
            label: `密码登录`,
            children: <Normallogin></Normallogin>,
        },
        {
            key: '2',
            label: `短信登录`,
            children: <Phonelogin />,
        },
    ];
    return (
        <div className='login'>
            <Card>
                <Tabs defaultActiveKey="1" tabBarGutter={120} centered items={items} onChange={onChange} />
            </Card>
        </div>
    );
}

export default Login;
